<template>
  <div :class="`${prefixCls}-content`">
    <BasicForm @register="registerForm" @submit="handleSubmit" :class="`${prefixCls}-copyright`"> 
      <template #formFooter>
        <a-button :class="`${prefixCls}-copyright-submit`" @click="handleSubmit" type="primary" :loading="loading" style="margin-right: 0.9rem">确定</a-button>
      </template>
    </BasicForm>
  </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicForm } from '/@/components/Form/index';
import { copyrightFormSchema } from '../data';
import { useConfigForm, ConfigFormProps } from '/@/views/system/configCenter/hooks/useConfigForm'
import { ConfigKey } from '/@/views/system/config/config.model';
import { useDesign } from '/@/hooks/web/useDesign';
import { emit } from 'process';
const emit = defineEmits(['query-success'])
const { prefixCls } = useDesign('config-center')

const configFromProps : ConfigFormProps = {
  configKey: ConfigKey.COPYRIGHT,
  schemas: copyrightFormSchema,
  labelWidth: 100
}
const { registerForm, handleSubmit, loading } = useConfigForm(configFromProps, emit)
</script>


<style lang="less" scoped>
@import '../style.less';
@prefix-cls: ~'@{namespace}-config-center';
.@{prefix-cls}-copyright {
  width: 700px;
  &-submit {
    margin-left: 100px;
  }
}

</style>./useConfigForm